<template>
  <ms-block-tip title="条件搜索">
    <el-form :inline="true" :model="searchForm">
<#if searchs??>
    <#list searchs as column>
      <el-form-item label="${column.label}" prop="${column.colName}">
        <el-input v-model="searchForm.${column.colName}" />
      </el-form-item>
    </#list>
      <el-form-item>
        <el-button size="small" type="success" @click="$emit('search', searchForm)">查询</el-button>
        <el-button size="small" type="primary" @click="$emit('add')" v-permission="['${changeClassName}:save']">添加</el-button>
      </el-form-item>
</#if>
    </el-form>
  </ms-block-tip>
</template>

<script>
import MsBlockTip from '@/common/blockTip'
export default {
  components: {
    MsBlockTip
  },
  data() {
    return {
      searchForm: {}
    }
  }
}
</script>

<style lang="stylus" scoped>
  @import '~@/assets/style/search.stylus'
</style>
